home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / IDL / Translat.idl < prev    next >
Encoding:
Text File  |  1994-04-19  |  2.2 KB  |  83 lines  |  [TEXT/MPS ]

  1. //# Copyright:    © 1993-94 by Apple Computer, Inc., all rights reserved.
  2. #ifndef _TRANSLAT_
  3. #define _TRANSLAT_
  4.  
  5. #ifndef _ODOBJECT_
  6. #include "ODObject.idl"
  7. #endif
  8.  
  9. //=====================================================================================
  10. // Constants
  11. //=====================================================================================
  12.  
  13. enum ODTranslateResultConsts {
  14.     kODCannotTranslate,
  15.     kODCanTranslate,
  16.     kODNative
  17. };
  18.  
  19. enum ODPlatformTypeSpaceConsts {
  20.     kODPlatformFileType,
  21.     kODPlatformDataType
  22. } ;
  23.  
  24. //=====================================================================================
  25. // Classes defined in this interface
  26. //=====================================================================================
  27. interface  ODTranslation;
  28.  
  29. //=====================================================================================
  30. // Classes used by this interface
  31. //=====================================================================================
  32. interface  ODTypeSet;
  33. interface  ODStorageUnitView;
  34.  
  35. //=====================================================================================
  36. // Class ODTranslation
  37. //=====================================================================================
  38.  
  39. interface ODTranslation :  ODObject
  40. {
  41.     void InitTranslation();
  42.         
  43.     ODTranslateResult  CanTranslate(in ODType fromType);
  44.     
  45.     ODTypeSet   GetTranslationOf(in ODType fromType);
  46.     
  47.     ODTranslateResult TranslateView(in ODStorageUnitView fromView,
  48.                                 in ODStorageUnitView toView);
  49.     
  50.     ODTranslateResult Translate(in ODPtr fromData,
  51.                                 in ODULong fromDataSize,
  52.                                 in ODType fromType,
  53.                                 in ODType  toType,
  54.                                 out ODPtr toData,
  55.                                 out ODULong toDataSize);
  56.     
  57.     ODType GetISOTypeFromPlatformType(in ODPlatformType platformType,
  58.                                         in ODPlatformTypeSpace typeSpace);
  59.     
  60.     ODPlatformType GetPlatformTypeFromISOType(in ODType type);
  61.  
  62. #ifdef __SOMIDL__
  63.   implementation
  64.   {
  65.       override:
  66.         Purge,
  67.         somInit,
  68.         somUninit;
  69.     releaseorder:
  70.         InitTranslation,
  71.         CanTranslate,
  72.         GetTranslationOf,
  73.         TranslateView,
  74.         Translate,
  75.         GetISOTypeFromPlatformType,
  76.         GetPlatformTypeFromISOType;
  77.   };
  78. #endif
  79.  
  80. };
  81.  
  82. #endif    // _TRANSLAT_
  83.